package com.sharemarking.application.wechat.api;

import com.sharemarking.application.wechat.service.AppOssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by Administrator on 2018/1/15.
 */

@RestController
@RequestMapping(value = "api/appOss")
public class AppOssApi {
    @Autowired
    AppOssService appOssService;

    /**
     * 网页直传OSS获取签名
     * @param request
     * @return
     */
    @RequestMapping("appOss")
    public void appOss(HttpServletRequest request, HttpServletResponse response){
        try {
            appOssService.appOss(request, response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
